==>>

sealed abstract
class ==>>[A, B]

An immutable map of key/value pairs implemented as a balanced binary tree

Based on Haskell's Data.Map

Since

7.0.3

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def +(a: (A, B))(implicit o: Order[A]): A ==>> B

tupled form of insert

tupled form of insert

def -(k: A)(implicit o: Order[A]): A ==>> B

alias for delete

alias for delete

def \\[C](other: A ==>> C)(implicit o: Order[A]): A ==>> B
def adjust(k: A, f: B => B)(implicit o: Order[A]): A ==>> B

if the key exists, transforms its value - O(log n)

if the key exists, transforms its value - O(log n)

def adjustWithKey(k: A, f: (A, B) => B)(implicit o: Order[A]): A ==>> B

like adjust but with the key available in the transformation - O(log n)

like adjust but with the key available in the transformation - O(log n)

def alter(k: A, f: Maybe[B] => Maybe[B])(implicit o: Order[A]): A ==>> B
def delete(k: A)(implicit n: Order[A]): A ==>> B

removes a key/value pair - O(log n)

removes a key/value pair - O(log n)

def deleteAt(i: Int): A ==>> B
def deleteMax: A ==>> B
def deleteMin: A ==>> B
def difference[C](other: A ==>> C)(implicit o: Order[A]): A ==>> B
def differenceWith[C](other: A ==>> C)(f: (B, C) => Maybe[B])(implicit o: Order[A]): A ==>> B
def differenceWithKey[C](other: A ==>> C)(f: (A, B, C) => Maybe[B])(implicit o: Order[A]): A ==>> B
@tailrec
final
def elemAt(i: Int): Maybe[(A, B)]
final override
def equals(other: Any): Boolean
Definition Classes
Any
def filter(p: B => Boolean)(implicit o: Order[A]): A ==>> B
def filterM[F[_]](f: B => F[Boolean])(implicit F: Applicative[F], O: Order[A]): F[A ==>> B]
def filterWithKey(p: (A, B) => Boolean)(implicit o: Order[A]): A ==>> B
@tailrec
final
def findMax: Maybe[(A, B)]
@tailrec
final
def findMin: Maybe[(A, B)]
def fold[C](z: C)(f: (A, B, C) => C): C
def foldMapWithKey[C](f: (A, B) => C)(implicit F: Monoid[C]): C
def foldlWithKey[C](z: C)(f: (C, A, B) => C): C
def foldrWithKey[C](z: C)(f: (A, B, C) => C): C
final override
def hashCode: Int
Definition Classes
Any
def insert(kx: A, x: B)(implicit n: Order[A]): A ==>> B

inserts a new key/value - O(log n).

inserts a new key/value - O(log n).

If the key is already present, its value is replaced by the provided value.

def insertWith(f: (B, B) => B, kx: A, x: B)(implicit o: Order[A]): A ==>> B

inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

Value Params
f

function to resolve conflict with existing key: (insertedValue, existingValue) => resolvedValue

kx

key

x

value to insert if the key is not already present

def insertWithKey(f: (A, B, B) => B, kx: A, x: B)(implicit o: Order[A]): A ==>> B

inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

Value Params
f

function to resolve conflict with existing key: (key, insertedValue, existingValue) => resolvedValue

kx

key

x

value to insert if the key is not already present

def intersection[C](other: A ==>> C)(implicit o: Order[A]): A ==>> B
def intersectionWith[C, D](other: A ==>> C)(f: (B, C) => D)(implicit o: Order[A]): A ==>> D
def intersectionWithKey[C, D](other: A ==>> C)(f: (A, B, C) => D)(implicit o: Order[A]): A ==>> D
def isEmpty: Boolean

returns true if this map contains no key/value pairs - O(1)

returns true if this map contains no key/value pairs - O(1)

def isSubmapOf(a: A ==>> B)(implicit o: Order[A], e: Equal[B]): Boolean
def isSubmapOfBy(a: A ==>> B, f: (B, B) => Boolean)(implicit o: Order[A]): Boolean
def keySet: ISet[A]
def keys: IList[A]
@tailrec
final
def lookup(k: A)(implicit n: Order[A]): Maybe[B]
@tailrec
final
def lookupAssoc(k: A)(implicit n: Order[A]): Maybe[(A, B)]
@tailrec
final
def lookupGE(k: A)(implicit o: Order[A]): Maybe[(A, B)]
@tailrec
final
def lookupGT(k: A)(implicit o: Order[A]): Maybe[(A, B)]
def lookupIndex(k: A)(implicit o: Order[A]): Maybe[Int]
@tailrec
final
def lookupLE(k: A)(implicit o: Order[A]): Maybe[(A, B)]
@tailrec
final
def lookupLT(k: A)(implicit o: Order[A]): Maybe[(A, B)]
def map[C](f: B => C): A ==>> C
def mapAccum[C](z: C)(f: (C, B) => (C, B)): (C, A ==>> B)
def mapAccumL[C](a: C)(f: (C, A, B) => (C, B)): (C, A ==>> B)
def mapAccumWithKey[C](z: C)(f: (C, A, B) => (C, B)): (C, A ==>> B)
def mapEither[C, D](f: B => C \/ D)(implicit o: Order[A]): (A ==>> C, A ==>> D)
def mapEitherWithKey[C, D](f: (A, B) => C \/ D)(implicit o: Order[A]): (A ==>> C, A ==>> D)
def mapKeys[C](f: A => C)(implicit o: Order[C]): C ==>> B
def mapKeysWith[C](f: A => C, f2: (B, B) => B)(implicit o: Order[C]): C ==>> B
def mapMaybe[C](f: B => Maybe[C])(implicit o: Order[A]): A ==>> C
def mapMaybeWithKey[C](f: (A, B) => Maybe[C])(implicit o: Order[A]): A ==>> C
def mapWithKey[C](f: (A, B) => C): A ==>> C
def maxView: Maybe[(B, A ==>> B)]
def maxViewWithKey: Maybe[((A, B), A ==>> B)]
def member(k: A)(implicit n: Order[A]): Boolean
def minView: Maybe[(B, A ==>> B)]
def minViewWithKey: Maybe[((A, B), A ==>> B)]
def notMember(k: A)(implicit n: Order[A]): Boolean
def partition(p: B => Boolean)(implicit o: Order[A]): (A ==>> B, A ==>> B)
def partitionWithKey(p: (A, B) => Boolean)(implicit o: Order[A]): (A ==>> B, A ==>> B)
def split(k: A)(implicit o: Order[A]): (A ==>> B, A ==>> B)
def splitLookup(k: A)(implicit o: Order[A]): (A ==>> B, Maybe[B], A ==>> B)
def splitLookupWithKey(k: A)(implicit o: Order[A]): (A ==>> B, Maybe[(A, B)], A ==>> B)
def splitRoot: IList[A ==>> B]
def toAscIList: IList[(A, B)]
def toAscList: List[(A, B)]
def toDescIList: IList[(A, B)]
def toDescList: List[(A, B)]
def toIList: IList[(A, B)]
def toList: List[(A, B)]
def traverseWithKey[F[_], C](f: (A, B) => F[C])(implicit G: Applicative[F]): F[A ==>> C]
def union(other: A ==>> B)(implicit k: Order[A]): A ==>> B
def unionWith(other: A ==>> B)(f: (B, B) => B)(implicit o: Order[A]): A ==>> B
def unionWithKey(other: A ==>> B)(f: (A, B, B) => B)(implicit o: Order[A]): A ==>> B
def update(k: A, f: B => Maybe[B])(implicit o: Order[A]): A ==>> B

updates or removes a value - O(log n)

updates or removes a value - O(log n)

if f returns None, then the key is removed from the map

def updateAppend(k: A, v: B)(implicit o: Order[A], bsg: Semigroup[B]): A ==>> B

insert v into the map at k. If there is already a value for k, append to the existing value using the Semigroup

insert v into the map at k. If there is already a value for k, append to the existing value using the Semigroup

def updateAt(i: Int, f: (A, B) => Maybe[B]): A ==>> B
def updateLookupWithKey(k: A, f: (A, B) => Maybe[B])(implicit o: Order[A]): (Maybe[B], A ==>> B)

looks up a key and updates its value - O(log n)

looks up a key and updates its value - O(log n)

Similar to updateWithKey but also returns the value. If the value was updated, returns the new value. If the value was deleted, returns the old value.

def updateMax(f: B => Maybe[B]): A ==>> B
def updateMaxWithKey(f: (A, B) => Maybe[B]): A ==>> B
def updateMin(f: B => Maybe[B]): A ==>> B
def updateMinWithKey(f: (A, B) => Maybe[B]): A ==>> B
def updateWithKey(k: A, f: (A, B) => Maybe[B])(implicit o: Order[A]): A ==>> B

like update but with the key available in the update function - O(log n)

like update but with the key available in the update function - O(log n)

def values: IList[B]

Deprecated methods

@deprecated("trim is no longer a public function", "7.3") @tailrec
final
def trim(lo: A => Ordering, hi: A => Ordering): A ==>> B
Deprecated
@deprecated("trimLookupLo is no longer a public function", "7.3") @tailrec
final
def trimLookupLo(lo: A, cmphi: A => Ordering)(implicit o: Order[A]): (Maybe[(A, B)], A ==>> B)
Deprecated

Abstract fields

val size: Int

number of key/value pairs - O(1)

number of key/value pairs - O(1)